package com.tech.zhidengxian.model.dto.page;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class MyPage<T> {
    private List<T> data;
    private Integer currentPage;
    private Integer pageSize;
    private Long total;

    public static <T> MyPage<T> of(List<T> data, Integer currentPage, Integer pageSize, Long total) {
        return new MyPage<>(data, currentPage, pageSize, total);
    }
}
